﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Admin/Masters/Admin.master" 
    CodeBehind="DesignFiles.aspx.vb" Inherits="Boogaloo.Admin.UI.Webpages.DesignFiles" 
    title="Mindfly Web Studio's Boogaloo - Host - Design Files" %>
<%@ register tagprefix="boogaloo" assembly="Boogaloo.Admin" namespace="Boogaloo.Admin.UI.Controls" %>     
<%@ register tagprefix="mfb" tagname="hostThemes" src="~/Admin/Controls/Host_themes.ascx" %>
<script runat="server">
    '
    ' Boogaloo® - http://www.mindfly.com
    ' Copyright (c) 2008
    ' by Mindfly, Inc.
    '
    ' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
    ' documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
    ' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
    ' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    '
    ' The above copyright notice and this permission notice shall be included in all copies or substantial portions 
    ' of the Software.
    '
    ' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    ' INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    ' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    ' SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    ' SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    ' WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    ' THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
</script>
<asp:Content ID="MainConent" ContentPlaceHolderID="MainContent" runat="server">

        <h2>Master Pages and Themes</h2>
       <asp:label id="lbl_ddl_dir" associatedcontrolid="ddl_dir" runat="server" text="Look for master page in this directory" /><br />
       <asp:dropdownlist id="ddl_dir" runat="server" autopostback="true" />
        
        <asp:updatepanel id="up" runat="server">
        <contenttemplate>
        
        <fieldset>        
        <legend>Master pages found in directory selected</legend>
        
        <asp:repeater id="rpt_files" runat="server">
            <headertemplate>
            <ul>
            <li>
                <span>Master page</span>
                <span>Alias</span>
                
            </li>
            </headertemplate>
            <itemtemplate>
            <li>
                <asp:literal id="lit_filename" runat="server" />                
                <asp:textbox id="txt_alias" runat="server" />
                <asp:linkbutton id="lb_add" runat="server" text="Add" onclick="lb_add_Click" />
                <asp:requiredfieldvalidator id="rfv_alias" controltovalidate="txt_alias" runat="server" display="Dynamic" errormessage=" A descriptive name is required for this master page so that it can be recognized in various selections throughout Boogaloo" />
            </li>
            </itemtemplate>
            <footertemplate>
            </ul>
            </footertemplate>
        </asp:repeater>
        <asp:literal id="lit_nofiles" runat="server">This directory does not have any master page files that can be associated.</asp:literal>
        
        </fieldset>
        
        <h3>Master pages already associated</h3>
        <asp:repeater id="rpt_mastertemplates" runat="server">
        <headertemplate><ul></headertemplate>
        
        <itemtemplate>
        <li>
            <boogaloo:labelhiddentextbox id="lht_alias" runat="server" CssClass="spnHiddenTextBox" label="Enter a name for your master page" validate="true" onclick="lht_alias_Click" errormessage="A descriptive name is required for this master page so that it can be recognized in various selections throughout Boogaloo" />
            
            <asp:literal id="lit_master_virtual_path" runat="server" />
        <boogaloo:commitwizard id="dwiz" runat="server" commit_text="Yep, do it already" cancel_text="Woops! I did not mean to hit that button." start_text="Remove" message="<p>You are about to delete this masterpage.</p><p>This action cannot be reversed!</p>" onclick="dwiz_Click" />
        </li>
        </itemtemplate>
        
        <footertemplate></ul></footertemplate>
        </asp:repeater>
        <asp:literal id="lit_nomasterpages" runat="server">This host does not currently have master pages associated with it.</asp:literal>
        

        
        
        </contenttemplate>        
        <triggers>
            <asp:asyncpostbacktrigger controlid="ddl_dir" />
        </triggers>
        </asp:updatepanel>
        
        <mfb:hostThemes runat="server" />

        

        <br />
        <br />

        <boogaloo:htmlretriever runat="server" html_for="themes_help" page_group="host" />
        
    </asp:Content>



